﻿#region << 文 件 说 明 >>

/*----------------------------------------------------------------
// 文件名称：TreeDetailBaseModel
// 创 建 者：杨程
// 创建时间：2022/1/29 16:33:45
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//
//
//----------------------------------------------------------------*/

#endregion

namespace Vampirewal.Core.Models;

/// <summary>
/// 树形明细基类
/// </summary>
/// <typeparam name="T"></typeparam>
public class TreeDetailBaseModel<T> : DetailBaseModel where T : DetailBaseModel
{
    /// <summary>
    /// 
    /// </summary>
    public TreeDetailBaseModel()
    {
        //构造函数
        Childs = new ObservableCollection<T>();
    }

    private T _Parent;

    /// <summary>
    /// 父类
    /// </summary>
    public T Parent
    {
        get { return _Parent; }
        set { _Parent = value; OnPropertyChanged(); }
    }

    private string _ParentId;

    /// <summary>
    /// 父ID
    /// </summary>
    public string ParentId
    {
        get { return _ParentId; }
        set { _ParentId = value; OnPropertyChanged(); }
    }

    /// <summary>
    /// 子集
    /// </summary>
    public ObservableCollection<T> Childs { get; set; }
}